package com.cmc.cloud.cmclink.doc.api.document.req;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 订舱附加要求 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
public class RequirementsBaseDto {

    @Schema(description = "外键", example = "13351")
    private Long referenceId;

    @Schema(description = "业务类型 so、 si", example = "1")
    @Length(max = 10, message = "业务类型支持最大长度{max}")
    private String referenceType;

    @Schema(description = "备注字段类型", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "备注字段类型不能为空")
    @Length(max = 30, message = "备注字段类型支持最大长度{max}")
    private String requireTypeCode;

    @Schema(description = "备注字段类型", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "备注字段代码 关联字典表查询中文描述不能为空")
    @Length(max = 50, message = "备注字段代码 关联字典表查询中文描述支持最大长度{max}")
    private String requireCode;

    @Schema(description = "备注字段内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
    @NotBlank(message = "备注字段内容不能为空")
    @Length(max = 200, message = "备注字段内容支持最大长度{max}")
    private String requireRemark;

    @Schema(description = "创建人id")
    @NotBlank(message = "创建人不允许为空")
    private String creator;

}
